package edu.berkeley.cs160.GroupC;

import java.io.File;

import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.media.MediaScannerConnection;
import android.media.MediaScannerConnection.MediaScannerConnectionClient;
import android.net.Uri;
import android.provider.MediaStore;
import android.util.Log;

public class BPMreader {
	private MediaScannerConnection mMs;
	private File mFile;


	public BPMreader(Context context, File f) {
		mFile = f;
		mMs = new MediaScannerConnection(context,
				(MediaScannerConnectionClient) this);
		mMs.connect();
	}

	public void onMediaScannerConnected() {
		mMs.scanFile(mFile.getAbsolutePath(), null);
	}

	public void onScanCompleted(String path, Uri uri) {
		mMs.disconnect();
	}

}
